package com.mmsj;

import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

public class ListActivity extends AppCompatActivity {

    private ListView listView;

    private ArrayAdapter<String> adapter;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_list);
        String[] songList={"青花瓷","孤勇者","爱你一万年","一千个伤心的理由","伤心太平洋","吻别","光辉岁月","隐形的翅膀","挥着翅膀的女孩","因为爱所以爱","平凡之路","晴天","勇气","告白气球","后来"};
        listView=findViewById(R.id.listView);
        adapter=new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,songList);
        listView.setAdapter(adapter);
    }

}
